/* 整个网页的字体,颜色,背景基调 */
body {
  font: 14px/1.5 'Helvetica Neue', 'Helvetica', 'Arial', 'Microsoft Yahei', 'Hiragino Sans GB', 'Heiti SC',
    'WenQuanYi Micro Hei', 'sans-serif';
  color: #333;
  background-color: #f3f5f7;
}

/* 版心 */
.w {
  width: 1200px;
  margin: 0 auto;
}

/* 头部区域 */
.header {
  height: 42px;
  margin-top: 30px;

  .logo {
    float: left;
    width: 196px;
    height: 42px;

    img {
      width: 100%;
    }
  }

  .nav {
    float: left;
    margin-left: 70px;

    li {
      float: left;
      margin-right: 25px;

      a {
        display: block;
        color: #050505;
        font-size: 18px;
        line-height: 42px;
        padding: 0 10px;

        &:hover {
          border-bottom: 2px solid #00a4ff;
        }
      }
    }
  }

  .search {
    input {
      float: left;
      width: 340px;
      height: 40px;
      border: 1px solid #00a4ff;
      border-right: none;
      margin-left: 65px;
      padding-left: 20px;
    }

    button {
      float: left;
      width: 50px;
      height: 42px;
      border: none;
      background: #00a4ff url(../img/search.png) no-repeat center;

      &:hover {
        cursor: pointer;
        background-color: #0198e9;
      }
    }
  }

  .user {
    float: right;
    height: 42px;
    color: #666;
    line-height: 42px;
    margin-right: 25px;

    img {
      vertical-align: middle;
    }
  }
}

/* banner */
.banner {
  margin-top: 30px;
  background-color: #1c036c;
}

.banner .w {
  height: 420px;
  background: url(../img/banner.png) no-repeat center;
}

/* 侧边栏 */
.banner .side {
  float: left;
  width: 190px;
  height: 420px;
  background-color: rgba(0, 0, 0, 0.3);
}

.banner .side li a {
  display: block;
  color: #fff;
  line-height: 46px;
  padding: 0 20px;
}

.banner .side li a:hover {
  color: #00a4ff;
  font-weight: bolder;
  text-shadow: 2px 2px 2px #2b2b2b;
}

.banner .side li a span {
  float: right;
}

/* 课程 */
.course {
  float: right;
  width: 230px;
  height: 300px;
  background-color: #fff;
  margin-top: 60px;
}

.course h2 {
  color: #fff;
  font-size: 18px;
  text-align: center;
  height: 45px;
  line-height: 45px;
  background-color: #9bceea;
}

.course .course-list {
  padding: 0 20px;
}

.course .course-list li {
  border-bottom: 1px solid #ccc;
  padding: 12px 0;
}

.course .course-list li p {
  color: #a5a5a5;
  font-size: 12px;
}

.course > a {
  display: block;
  width: 200px;
  height: 40px;
  color: #00a4ff;
  font-size: 18px;
  font-weight: bolder;
  line-height: 40px;
  border: 1px solid #00a4ff;
  text-align: center;
  margin: 10px auto;
}

.course > a:hover {
  border-width: 2px;
}

/* recommend */
.recommend {
  height: 60px;
  line-height: 60px;
  background-color: #fff;
  margin-top: 15px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}
.recommend h3 {
  float: left;
  color: #00a4ff;
  font-size: 16px;
  margin-left: 20px;
}

.recommend ul {
  float: left;
  margin-left: 20px;
}

.recommend ul li {
  float: left;
}

.recommend ul li a {
  color: #050505;
  font-size: 16px;
  padding: 0 30px;
  border-left: 1px solid #bfbfbf;
}

.recommend ul li a:hover {
  color: #00a4ff;
  font-style: italic;
}

.recommend > a {
  float: right;
  color: #00a4ff;
  margin-right: 25px;
}

/* 展示区域1 */
.box {
  position: relative;
  margin-top: 20px;
}

/* 侧边栏 */
.box .box-side {
  position: absolute;
  top: 200px;
  left: -240px;
  width: 220px;
  background-color: #fff;
}

.box .box-side li a {
  display: block;
  color: #2b2b2b;
  font-size: 16px;
  padding: 10px 40px;
}

.box .box-side li a:hover {
  color: #00a4ff;
}

.box .box-head {
  height: 60px;
  line-height: 60px;
}

.box .box-head h3 {
  float: left;
  color: #494949;
  font-size: 20px;
  font-weight: normal;
}

.box .box-head a {
  float: right;
  color: #a5a5a5;
  font-size: 12px;
  margin-right: 25px;
}

/* 
  突破版心技巧:
  横向排列多个元素时,每个元素都有一个向右的外边距,如果累加,最后一个元素的
  外边距可能超过版心的宽度,会导致最后一个元素换行,此时我们可以让子元素容器
  的宽度超过版心一个外边距的距离,这样,最后一个元素就可以完美的排列在末尾,而
  超出部分因为是外边距,所以不可见.
*/
.box .box-body {
  width: 1215px;
}

.box .box-body li {
  position: relative;
  float: left;
  width: 228px;
  height: 270px;
  margin: 0 15px 15px 0;
  background-color: #fff;
  /* 过渡 */
  transition: transform 0.3s linear;
}

.box .box-body li:hover {
  box-shadow: 0 3px 5px #ccc;
  /* 移动 */
  transform: translateY(-3px);
}

.box .box-body li a .tag {
  position: absolute;
  top: 5px;
  right: -4px;
  width: 40px;
  height: 24px;
}

.hot {
  background: url(../img/hot.png) no-repeat;
}

.new {
  background: url(../img/new.png) no-repeat;
}

.box .box-body li a img {
  width: 100%;
  height: 156px;
}

.box .box-body li a h4 {
  color: #050505;
  height: 45px;
  font-weight: normal;
  padding: 15px 20px;
}

.box .box-body li a p {
  color: #999;
  font-size: 12px;
  padding: 0 20px;
}

.box .box-body li a p span {
  color: #ff7c2d;
}

/* 展示区域2 */
.box .box-head ul {
  float: left;
  margin-left: 280px;
}

.box .box-head ul li {
  float: left;
}

.box .box-head ul li a {
  display: block;
  font-size: 18px;
  padding: 0 20px;
}

.box .box-head ul li a:hover {
  color: #00a4ff;
}

.box .box-body .box-body-left {
  float: left;
  margin-right: 15px;
}

.box .box-body .box-body-right-top {
  float: left;
  margin-bottom: 15px;
}

/* 底部区域 */
.footer {
  height: 300px;
  margin-top: 30px;
  background-color: #fff;
}

.footer .copy {
  float: left;
  margin-top: 30px;
}

.footer .copy p {
  color: #a5a5a5;
  font-size: 12px;
  margin: 20px 0 25px 0;
}

.footer .copy > a {
  display: block;
  width: 150px;
  height: 40px;
  color: #00a4ff;
  text-align: center;
  line-height: 40px;
  border: 1px solid #00a4ff;
}

.footer .links {
  float: right;
  margin-right: 25px;
}

.footer .links dl {
  float: left;
  margin-left: 150px;
}

.footer .links dl dt {
  color: #333;
  font-size: 16px;
  margin: 30px 0 15px 0;
}

.footer .links dl dd a {
  color: #333;
  font-size: 12px;
}

.footer .links dl dd a:hover {
  color: #00a4ff;
}
